﻿#include "InsourcedTranslatorTestWidget.h"
#include "ui_InsourcedTranslatorTestWidget.h"

#include <QMessageBox>
#include <QFileDialog>
#include <QInputDialog>
#include <QColorDialog>

InsourcedTranslatorTestWidget::InsourcedTranslatorTestWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::InsourcedTranslatorTestWidget)
{
    ui->setupUi(this);
}

InsourcedTranslatorTestWidget::~InsourcedTranslatorTestWidget()
{
    delete ui;
}


void InsourcedTranslatorTestWidget::on_buttonMessageBox_clicked() {
    QMessageBox::StandardButtons buttons;
    buttons |= QMessageBox::Ok;
    buttons |= QMessageBox::Open;
    buttons |= QMessageBox::Save;
    buttons |= QMessageBox::Cancel;
    buttons |= QMessageBox::Close;
    buttons |= QMessageBox::Discard;
    buttons |= QMessageBox::Apply;
    buttons |= QMessageBox::Reset;
    buttons |= QMessageBox::RestoreDefaults;
    buttons |= QMessageBox::Help;
    buttons |= QMessageBox::SaveAll;
    buttons |= QMessageBox::Yes;
    buttons |= QMessageBox::YesToAll;
    buttons |= QMessageBox::No;
    buttons |= QMessageBox::NoToAll;
    buttons |= QMessageBox::Abort;
    buttons |= QMessageBox::Retry;
    buttons |= QMessageBox::Ignore;
    QMessageBox::information(this, "Information", "ABC", buttons);
}

void InsourcedTranslatorTestWidget::on_buttonFileDialog_clicked() {
    QFileDialog::getOpenFileName(this, "Select file");
}


void InsourcedTranslatorTestWidget::on_buttonInputDialog_clicked() {
    QInputDialog::getInt(this, "Input age", "Age");
}


void InsourcedTranslatorTestWidget::on_buttonColorDialog_clicked() {
    QColorDialog::getColor();
}

